package com.raitcon.hibernate.bean;
// Generated 27/05/2014 07:54:56 AM by Hibernate Tools 3.2.1.GA


import java.util.Date;
import java.util.HashSet;
import java.util.Set;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * Menu generated by hbm2java
 */
@Entity
@Table(name="menu"
    ,schema="public"
)
public class Menu  implements java.io.Serializable {


     private int idMenu;
     private char state;
     private String name;
     private String description;
     private Date registryDate;
     private Integer peso;
     private Set<SubMenu> subMenus = new HashSet<SubMenu>(0);
     private Set<SubMenu> subMenus_1 = new HashSet<SubMenu>(0);
     private Set<RolesAccion> rolesAccions = new HashSet<RolesAccion>(0);
     private Set<RolesAccion> rolesAccions_1 = new HashSet<RolesAccion>(0);

    public Menu() {
    }

	
    public Menu(int idMenu, char state, String name) {
        this.idMenu = idMenu;
        this.state = state;
        this.name = name;
    }
    public Menu(int idMenu, char state, String name, String description, Date registryDate, Integer peso, Set<SubMenu> subMenus, Set<SubMenu> subMenus_1, Set<RolesAccion> rolesAccions, Set<RolesAccion> rolesAccions_1) {
       this.idMenu = idMenu;
       this.state = state;
       this.name = name;
       this.description = description;
       this.registryDate = registryDate;
       this.peso = peso;
       this.subMenus = subMenus;
       this.subMenus_1 = subMenus_1;
       this.rolesAccions = rolesAccions;
       this.rolesAccions_1 = rolesAccions_1;
    }
   
     @Id 
    
    @Column(name="id_menu", unique=true, nullable=false)
    public int getIdMenu() {
        return this.idMenu;
    }
    
    public void setIdMenu(int idMenu) {
        this.idMenu = idMenu;
    }
    
    @Column(name="state", nullable=false, length=1)
    public char getState() {
        return this.state;
    }
    
    public void setState(char state) {
        this.state = state;
    }
    
    @Column(name="name", nullable=false, length=30)
    public String getName() {
        return this.name;
    }
    
    public void setName(String name) {
        this.name = name;
    }
    
    @Column(name="description", length=50)
    public String getDescription() {
        return this.description;
    }
    
    public void setDescription(String description) {
        this.description = description;
    }
    @Temporal(TemporalType.TIMESTAMP)
    @Column(name="registry_date", length=29)
    public Date getRegistryDate() {
        return this.registryDate;
    }
    
    public void setRegistryDate(Date registryDate) {
        this.registryDate = registryDate;
    }
    
    @Column(name="peso")
    public Integer getPeso() {
        return this.peso;
    }
    
    public void setPeso(Integer peso) {
        this.peso = peso;
    }
@OneToMany(cascade=CascadeType.ALL, fetch=FetchType.LAZY, mappedBy="menu")
    public Set<SubMenu> getSubMenus() {
        return this.subMenus;
    }
    
    public void setSubMenus(Set<SubMenu> subMenus) {
        this.subMenus = subMenus;
    }
@OneToMany(cascade=CascadeType.ALL, fetch=FetchType.LAZY, mappedBy="menu")
    public Set<SubMenu> getSubMenus_1() {
        return this.subMenus_1;
    }
    
    public void setSubMenus_1(Set<SubMenu> subMenus_1) {
        this.subMenus_1 = subMenus_1;
    }
@OneToMany(cascade=CascadeType.ALL, fetch=FetchType.LAZY, mappedBy="menu")
    public Set<RolesAccion> getRolesAccions() {
        return this.rolesAccions;
    }
    
    public void setRolesAccions(Set<RolesAccion> rolesAccions) {
        this.rolesAccions = rolesAccions;
    }
@OneToMany(cascade=CascadeType.ALL, fetch=FetchType.LAZY, mappedBy="menu")
    public Set<RolesAccion> getRolesAccions_1() {
        return this.rolesAccions_1;
    }
    
    public void setRolesAccions_1(Set<RolesAccion> rolesAccions_1) {
        this.rolesAccions_1 = rolesAccions_1;
    }




}


